package com.zsy.mapper;

import com.zsy.entity.User;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface IUserMapper {
    User selectUser (@Param("phone") String phone);
    int insertUser(User user);

    //根据用户名查询这个用户所有信息
    User selectByUsername(String username);

    //根据用户id查角色
    List<String> selectRolesByUserId(Integer id);

    Integer updatePassword(@Param("username") String username, @Param("password") String password);

    //根据角色查询权限(接口路径)
    List<String> selectMenuByRoles(@Param("roleCodes")List<String> roleCodes);
}
